﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;


namespace ASEPMainProgram.Entities.MainFrame
{
    /// <summary>
    /// 项目实体类
    /// </summary>
    public class ItemEntity
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
        /// <summary>
        /// 项目ID
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string ItemId { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        [Required]
        [Column(TypeName = "varchar(32)")]
        public string ItemName { get; set; }
        /// <summary>
        /// 坐标
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Location { get; set; }
        /// <summary>
        /// 项目标识
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string ItemMark { get; set; }
        /// <summary>
        /// 注册组id
        /// </summary>
        [Required]
        [Column(TypeName = "varchar(32)")]
        public string RegGroupId { get; set; }
        /// <summary>
        /// 创建者ID
        /// </summary>
        [Required]
        [Column(TypeName = "varchar(64)")]
        public string CreateBy { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public ItemEntity()
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        public ItemEntity(string id, string name)
        {
            ItemId = id;
            ItemName = name;
        }
    }

    /// <summary>
    /// 
    /// </summary>
    public class ItemSimpleEntity
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        public string ItemId { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string ItemName { get; set; }
    }
}
